Skip to content

One parameter world python client#52

Closed
aurebidart wants to merge 1 commit intomainfrom
One-parameter-world-python-client
Closed

One parameter world python client#52
aurebidart wants to merge 1 commit intomainfrom
One-parameter-world-python-client

Conversation

@aurebidart
Copy link
Contributor

Fixes: #

About

This PR adds support for creating and reusing world configurations in ProjectAirSim, along with practical examples for users.

  • Two new example scripts have been added:

    • world_creator.py: creates a world from a scene file (scene_basic_drone.jsonc) and saves its configuration in a shared volume.
    • world_consumer.py: loads a previously saved world configuration and runs a demonstration flight sequence with a drone, showing camera views (chase cam, RGB, and depth).
  • In utils.py:

    • load_scene_config_as_dict has been extended to support multiple configuration files per robot or environment actor.
    • New helper functions merge_dicts and merge_lists have been introduced to recursively and cleanly merge configurations.
  • In world.py:

    • Automatic persistence of the world configuration has been implemented in airsim_shared/world_config.json.
    • The World constructor can automatically load the last saved configuration if no new scene is specified.
    • parent_topic has been adjusted for greater flexibility (/Sim instead of /Sim/SceneBasicDrone).

How Has This Been Tested?

  • Ran world_creator.py to generate a world and verified that world_config.json is saved correctly both inside and outside Docker.

  • Ran world_consumer.py to:

    • Load the previously saved world.
    • Display configured camera views in real time.
    • Execute the flight sequence (takeoff, ascend, descend, land) without errors.
  • Manually tested loading multiple robot configurations to validate correct merging of data.


try:
client.connect()
world = World(client) # sin argumentos
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translate comment

@aurebidart aurebidart force-pushed the One-parameter-world-python-client branch from b5ca72d to 4789336 Compare August 14, 2025 17:57
@aurebidart aurebidart closed this Aug 14, 2025
@aurebidart aurebidart deleted the One-parameter-world-python-client branch August 14, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants